//
//  ShowOrderCommentCell.m
//  YunGou
//
//  Created by macbook on 16/5/24.
//  Copyright © 2016年 macbook. All rights reserved.
//

#import "ShowOrderCommentCell.h"
#import "NSString+DateTransform.h"
#import <UIImageView+WebCache.h>

@interface ShowOrderCommentCell ()
@property (weak, nonatomic) IBOutlet UIImageView *avaterImage;
@property (weak, nonatomic) IBOutlet UILabel *userNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *commentLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@end

@implementation ShowOrderCommentCell

- (void)awakeFromNib {
    // Initialization code
    _avaterImage.layer.cornerRadius = _avaterImage.frame.size.width/2;
    _avaterImage.clipsToBounds = YES;
}

- (void)setModel:(ShowOrderCommentModel *)model{
    [_avaterImage sd_setImageWithURL:[NSURL URLWithString:[ImageUrl stringByAppendingString:model.img]]];
    _userNameLabel.text = model.username;
    _commentLabel.text = model.sdhf_content;
    _timeLabel.text = [NSString timeTransformWithString:model.sdhf_time andFormatter:@"yyyy.MM.dd HH:mm:ss"];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
